﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace STKMIS.Model
{
    /// <summary>
    /// 的实体类
    /// </summary>
    [Serializable]
    public class SaleModel
    {
        // 常量
        public const string tableName = "Sale";
        public const string primaryKeyName = "SaleID";

        // 成员变量
        private int _saleID;
        private string _saleBillNo;
        private int _productSupplierID;
        private decimal _purchaseSumMoney;
        private decimal _salesumMoney;
        private decimal _salesumProfit;
        private DateTime _saleTime;
        private int _saleUserID;
        private string _saleRemark;
        private string _billState;
        private Boolean _isDeleted;

        /// <summary>
        /// 字段名结构
        /// <summary>
        public struct FieldName
        {
            public const string saleID = "SaleID";
            public const string saleBillNo = "SaleBillNo";
            public const string productSupplierID = "ProductSupplierID";
            public const string purchaseSumMoney = "PurchaseSumMoney";
            public const string salesumMoney = "SaleSumMoney";
            public const string salesumProfit = "SaleSumProfit";
            public const string saleTime = "SaleTime";
            public const string saleUserID = "SaleUserID";
            public const string saleRemark = "SaleRemark";
            public const string billState = "BillState";
            public const string isDeleted = "IsDeleted";
        }

        /// <summary>
        /// 默认构造函数
        /// <summary>
        public SaleModel() { }

        /// <summary>
        /// 带参构造函数
        /// <summary>
        ///<param name="saleID">销售ID（主键）</param>
        ///<param name="saleBillNo">销售单号</param>
        ///<param name="productSupplierID">客户ID</param>
        ///<param name="purchaseSumMoney">采购金额</param>
        ///<param name="salesumMoney">销售金额</param>
        ///<param name="salesumProfit">销售利润</param>
        ///<param name="saleTime">销售时间</param>
        ///<param name="saleUserID">销售人</param>
        ///<param name="saleRemark">销售备注</param>
        ///<param name="billState">单据状态</param>
        ///<param name="isDeleted">是否已经删除</param>
        public SaleModel(int saleID, string saleBillNo, int productSupplierID, decimal purchaseSumMoney, decimal salesumMoney, decimal salesumProfit, DateTime saleTime, int saleUserID, string saleRemark, string billState, Boolean isDeleted)
        {
            this._saleID = saleID;
            this._saleBillNo = saleBillNo;
            this._productSupplierID = productSupplierID;
            this._purchaseSumMoney = purchaseSumMoney;
            this._salesumMoney = salesumMoney;
            this._salesumProfit = salesumProfit;
            this._saleTime = saleTime;
            this._saleUserID = saleUserID;
            this._saleRemark = saleRemark;
            this._billState = billState;
            this._isDeleted = isDeleted;
        }

        /// <summary>
        /// 销售ID（主键）
        /// <summary>
        public int SaleID
        { 
            get { return _saleID; }
            set { _saleID = value; }
        }

        /// <summary>
        /// 销售单号
        /// <summary>
        public string SaleBillNo
        { 
            get { return _saleBillNo; }
            set { _saleBillNo = value; }
        }

        /// <summary>
        /// 客户ID
        /// <summary>
        public int ProductSupplierID
        { 
            get { return _productSupplierID; }
            set { _productSupplierID = value; }
        }

        /// <summary>
        /// 采购金额
        /// <summary>
        public decimal PurchaseSumMoney
        { 
            get { return _purchaseSumMoney; }
            set { _purchaseSumMoney = value; }
        }

        /// <summary>
        /// 销售金额
        /// <summary>
        public decimal SaleSumMoney
        { 
            get { return _salesumMoney; }
            set { _salesumMoney = value; }
        }

        /// <summary>
        /// 销售利润
        /// <summary>
        public decimal SaleSumProfit
        { 
            get { return _salesumProfit; }
            set { _salesumProfit = value; }
        }

        /// <summary>
        /// 销售时间
        /// <summary>
        public DateTime SaleTime
        { 
            get { return _saleTime; }
            set { _saleTime = value; }
        }

        /// <summary>
        /// 销售人
        /// <summary>
        public int SaleUserID
        { 
            get { return _saleUserID; }
            set { _saleUserID = value; }
        }

        /// <summary>
        /// 销售备注
        /// <summary>
        public string SaleRemark
        { 
            get { return _saleRemark; }
            set { _saleRemark = value; }
        }

        /// <summary>
        /// 单据状态
        /// <summary>
        public string BillState
        { 
            get { return _billState; }
            set { _billState = value; }
        }

        /// <summary>
        /// 是否已经删除
        /// <summary>
        public Boolean IsDeleted
        { 
            get { return _isDeleted; }
            set { _isDeleted = value; }
        }
    }
}
